import { update } from 'js-md5';
import { createStore } from 'vuex'

export default createStore({
  state: {
    menuList:[],
  },
  getters: {
  },
  mutations: {
    updateMenuData(state, newInfo) {
      state.menuList = newInfo;
    },
  },
  actions: {
    updateMenuData(context, value) {
      context.commit('updateMenuData', value);
      localStorage.setItem('menuList',JSON.stringify(value))
    },
  },
  modules: {
  }
})
